package com.sync.utils.project.demo.service.impl;

import com.sync.utils.common.base.service.impl.BaseServiceImpl;
import com.sync.utils.framework.entity.SysOperLog;
import com.sync.utils.project.demo.mapper.LogMapper;
import com.sync.utils.project.demo.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class LogServiceImpl extends BaseServiceImpl<LogMapper,SysOperLog> implements LogService {

    @Autowired
    private LogMapper logMapper;

    /**
     * 异步日志保存
     *
     * @Author YWF
     * @Date  2023/4/6 11:34
     * @Param [sysOperLog]
     **/
    @Override
    @Async
    public void saveOperLog(SysOperLog sysOperLog) {
        logMapper.insert(sysOperLog);
    }

}
